file(GLOB_RECURSE HEARD ./*.h)
file(GLOB_RECURSE SOURCE ./*.cpp)

project(TradeBase)

include_directories(../Base ../StrategyBase lib_json KSynthesis ./)

SET(JSON_SRC ./lib_json/json_reader.cpp ./lib_json/json_value.cpp ./lib_json/json_writer.cpp ./lib_json/json_tool.h)

SET(KSynthesis_SRC ./KSynthesis/KSynthesisBase.cpp ./KSynthesis/KSynthesisBase.h ./KSynthesis/KSynthesisMin1.cpp ./KSynthesis/KSynthesisMin1.h ./KSynthesis/KSynthesisMin5.cpp ./KSynthesis/KSynthesisMin5.h)

source_group("JSON" FILES ${JSON_SRC})
source_group("KSynthesis" FILES ${KSynthesis_SRC})
source_group("Header Files" FILES ${HEARD})
source_group("Source Files" FILES ${SOURCE})

ADD_DEFINITIONS(-DTRADEBASE_LIB  -DJSON_DLL_BUILD)
#共享DLL中使用 MFC  
#ADD_DEFINITIONS(-D_AFXDLL)  
#SET(CMAKE_MFC_FLAG 2) #设置CMAKE_MFC_FLAG为2,0表示使用标准的MFC，1表示静态MFC,2表示共享  
ADD_LIBRARY(TradeBase SHARED ${HEARD} ${SOURCE} ${JSON_SRC} ${KSynthesis_SRC})
TARGET_LINK_LIBRARIES(TradeBase BaseTool StrategyBase Qt5::Core)